package org.luxor.html.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.luxor.commons.jdbc.handle.PassWordHandler;

import java.time.LocalDateTime;

/**
 * @author Mr.Yan  @date 2019/9/25$
 */
@Data
@ApiModel("用户表")
@TableName("user")
public class User {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @ApiModelProperty(value = "租户ID", example = "10000")
    private Long tenantId;
    @ApiModelProperty(value = "账号", example = "test")
    private String username;
    @TableField(typeHandler = PassWordHandler.class)
    @ApiModelProperty(value = "密码", example = "test@123")
    private String pwd;
    @ApiModelProperty(value = "真实姓名", example = "杨过")
    private String realName;
    @ApiModelProperty(value = "年龄", example = "18")
    private Integer age;
    @ApiModelProperty(value = "性别", example = "男")
    private Integer sex;
    @ApiModelProperty(value = "邮箱", example = "yanguo@163.com")
    private String email;
    @ApiModelProperty(value = "创建时间", example = "2018-08-08 00:00:00")
    private LocalDateTime createTime;

    @TableLogic
    @ApiModelProperty(value = "逻辑删除", hidden = true)
    private Integer delete;
    @Version
    @ApiModelProperty(value = "乐观锁", hidden = true)
    private Integer version;
    @TableField(value = "数据库不存在的字段",exist = false)
    private String remark;
}
